<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>:has</title>
    <style>
      .date {
        color: rebeccapurple;
      }
      [data-id="none"] {
        color: blue;
      }
      .date:has(*:focus-visible) {
        margin: 20px;
      }
      .date:has(> input) {
        background: #eee;
      }
      .date:has(.date-num) {
        color: rosybrown;
      }
    </style>
  </head>
  <body>
    <div class="day">
      <div class="date">
        <p class="date-num">1212</p>
      </div>
      <div class="date" data-id="none">
        <input value="123" placeholder="please input..."></input>
      </div>
    </div>
  </body>
</html>
